<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>修改</title>
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="author" content="Bluth Company">
    <link rel="shortcut icon" href="/food/Public/admin_style/assets/ico/favicon.html">
    <link href="/food/Public/admin_style/assets/css/bootstrap.css" rel="stylesheet">
    <link href="/food/Public/admin_style/assets/css/theme.css" rel="stylesheet">
    <link href="/food/Public/admin_style/assets/css/font-awesome.min.css" rel="stylesheet">
    <link href="/food/Public/admin_style/assets/css/alertify.css" rel="stylesheet">
    <link rel="Favicon Icon" href="favicon.ico">
</head>

<body>
	<div id="wrap">
    <div class="navbar navbar-fixed-top">
      <div class="navbar-inner">
        <div class="container-fluid">
          <div class="logo">
            <img src="/food/Public/admin_style/assets/img/logo.png" alt="Realm Admin Template">
          </div> 
         

          

        </div>
      </div>
    </div>

    <div class="container-fluid">

      <!-- Side menu -->  
     <div class="sidebar-nav nav-collapse collapse">
        <div class="user_side clearfix">
          <img src="/food/Public/admin_style/assets/img/qya.jpg" alt="Odinn god of Thunder">
          <h5>Admin</h5>
          <a href="#"><i class="icon-cog"></i> Settings</a>        
        </div>
          <div class="accordion-group">
            <div class="accordion-heading">
              <a class="accordion-toggle b_9FDDF6 collapsed" data-toggle="collapse" data-parent="#accordion2" href="#aollapse2"><i class="icon-reorder"></i> <span>数据统计与分析</span></a>
            </div>
             <div id="aollapse2" class="accordion-body collapse">
              <div class="accordion-inner">
                <a class="accordion-toggle" href="<?php echo U('Index/count');?>"><i class="icon-rss"></i> 统计</a>
             
              </div>
              </div>
            
            <div class="accordion-group">
            <div class="accordion-heading">
              <a  class="accordion-toggle b_9FDDF6 collapsed" data-toggle="collapse" data-parent="#accordion2" href="#bollapse2"><i class="icon-reorder"></i> <span>用户信息</span></a>
            </div>
            <div id="bollapse2" class="accordion-body collapse">
              <div class="accordion-inner">
                <a href="<?php echo U('User/userlist');?>" class="accordion-toggle" href="notifications.html"><i class="icon-rss"></i> 用户信息列表</a>
                
              </div>
               </div>

            <div class="accordion-group">
            <div class="accordion-heading">
              <a class="accordion-toggle b_9FDDF6 collapsed" data-toggle="collapse" data-parent="#accordion2" href="#collapse2"><i class="icon-reorder"></i> <span>用户发布美食信息</span></a>
            </div>
           
                          
                          <div id="collapse2" class="accordion-body collapse">
              <div class="accordion-inner">
                <a href="<?php echo U('Meishis/meishislist');?>" class="accordion-toggle" href="notifications.html"><i class="icon-rss"></i>用户发布美食信息列表</a>
               
              </div>
            </div>
            <div class="accordion-group">
            <div class="accordion-heading">
              <a class="accordion-toggle b_9FDDF6 collapsed" data-toggle="collapse" data-parent="#accordion2" href="#dollapse2"><i class="icon-reorder"></i> <span>管理员添加美食</span></a>
            </div>
            <div id="dollapse2" class="accordion-body collapse">
              <div class="accordion-inner">
                <a href="<?php echo U('Food/regfood');?>" class="accordion-toggle" href="notifications.html"><i class="icon-rss"></i> 管理员添加美食列表</a>
                
              </div>
               </div>
          </div>
          <div class="accordion-group">
            <div class="accordion-heading">
              <a class="accordion-toggle b_9FDDF6 collapsed" data-toggle="collapse" data-parent="#accordion2" href="#eollapse2"><i class="icon-reorder"></i> <span>管理员添加的美食列表</span></a>
            </div>
            <div id="eollapse2" class="accordion-body collapse">
              <div class="accordion-inner">
                <a href="<?php echo U('Food/foodlist');?>" class="accordion-toggle" href="notifications.html"><i class="icon-rss"></i> 管理员添加的信息列表</a>
                
              </div>
               </div>
          </div>
          </div>
          <div class="accordion-group">
      <div class="accordion-heading">
        <a class="accordion-toggle b_F6F1A2" href="<?php echo U('admin/index/signout');?>"><i class="icon-tasks"></i> <span>注销登录</span></a>
      </div>
    </div>
          </div>      
        </div>
      </div>

      <!-- /Side menu -->

        <!-- Main window -->
    <div class="main_container" id="tables_page">
      <div class="row-fluid">
        <br>
        <h2 class="heading">
          修改     
        </h2>
      </div>

          <div class="row-fluid">
           <div class="widget widget-padding span12">
             
    <div class="row-fluid">
          <div class="widget widget-padding span12">
            <div class="widget-header">
              <i class="icon-group"></i>
              <h5>修改 </h5>
              <div class="widget-buttons">
                  <a href="#" data-title="Documentation" class="tip" target="_blank"><i class="icon-external-link"></i></a>
                  <a href="#" data-title="Collapse" data-collapsed="false" class="tip collapse"><i class="icon-chevron-up"></i></a>
              </div>
            </div>  

 <div class="col-md-3  col-xs-12 col-sm-6 col-sm-offset-3 col-md-offset-4 col-xs-offset-2" >
            <form  method="post"  class="form-horizontal" action="<?php echo U(doUpdate);?>"  enctype="multipart/form-data" onsubmit="return check();" >
            <table id="foods" class="table table-responsive">
            <tr>
            <input  type="hidden"  name="id" value="<?php echo ($list["id"]); ?>">
            </tr>
            <tr>
            <td style="overflow: hidden;display: block;width: 90px">美食名称：</td>
            <td><input class="form-control" type="text"  name="foods_name" value="<?php echo ($list["foods_name"]); ?>"></td>
            </tr>
            <tr>
            <td style="overflow: hidden;display: block;width: 90px">美食类型：</td>
            <!-- <td><input class="form-control"  name="tid"  type="text" value="<?php echo ($list["tid"]); ?>"></td> -->
           <td>
             <select  data-placeholder="Select here.." class="span7"
                               id="tid"  name="tid"  type="text" value="<?php echo ($list["tid"]); ?>" required >
                          <option value=""></option>
                          <option value="1">东北菜</option>
                          <option value="2">四川菜</option>
                          <option value="3">江浙菜</option>
                          <option value="4">广东菜</option>
                       </select>
                       </td>
            </tr>
            <tr>
            <td style="overflow: hidden;display: block;width: 90px">美食做法：</td>
            <td><input class="form-control"  name="intro" type="text" value="<?php echo ($list["intro"]); ?>"></td>
            </tr>

            </table>  
                <div class="fileupload fileupload-new" data-provides="fileupload">
                   <input type="hidden" value="<?php echo ($list["picture"]); ?>" name="pic" >
                          <div class="fileupload-new img-thumbnail"
                               style="width: 110px; height: 110px;background-color:#5f5f5f">
                              <img src="/food/Public/Uploads/foodphoto/<?php echo ($list["picture"]); ?>">
                          </div>
                          <div class="fileupload-preview fileupload-exists img-thumbnail"
                               style="width: 110px; max-height: 110px;"></div>
                          
          <tr>
            <td style="overflow: hidden;display: block;width: 90px">美食图片：</td>
            <td><input class="form-control"  name="file" type="file" value="<?php echo ($list["picture"]); ?>"></td>
            </tr>

                      
                 <!--    <span class="btn btn-default btn-file">
                     <span class="fileupload-new">选择</span>
                     <span class="fileupload-exists">重选</span>
                     <input type="file" name="file" value="<?php echo ($list["picture"]); ?>">
                   </span>
                   <span>
                     <a class="btn btn-default fileupload-exists" data-dismiss="fileupload"
                               href="#">撤销</a>
                     </span> -->
                      </div> 
             <tr><td><button class="btn btn-danger" style="width: 120%; margin-top: 20px; text-align:center" type="submit">提交</button></td></tr>
            </form>
             </div>
          </div>
 <script type="text/javascript" src="/food/Public/admin_style/assets/js/jquery.min.js"></script>
    <script type="text/javascript" src="/food/Public/admin_style/assets/js/jquery-ui.min.js"></script>
    <script type="text/javascript" src="/food/Public/admin_style/assets/js/raphael-min.js"></script>
    <script type="text/javascript" src="/food/Public/admin_style/assets/js/bootstrap.js"></script>
    <script type="text/javascript" src='/food/Public/admin_style/assets/js/sparkline.js'></script>
    <script type="text/javascript" src='/food/Public/admin_style/assets/js/morris.min.js'></script>
    <script type="text/javascript" src="/food/Public/admin_style/assets/js/jquery.dataTables.min.js"></script>   
    <script type="text/javascript" src="/food/Public/admin_style/assets/js/jquery.masonry.min.js"></script>   
    <script type="text/javascript" src="/food/Public/admin_style/assets/js/jquery.imagesloaded.min.js"></script>   
    <script type="text/javascript" src="/food/Public/admin_style/assets/js/jquery.facybox.js"></script>   
    <script type="text/javascript" src="/food/Public/admin_style/assets/js/jquery.alertify.min.js"></script> 
    <script type="text/javascript" src="/food/Public/admin_style/assets/js/jquery.knob.js"></script>
    <script type='text/javascript' src='/food/Public/admin_style/assets/js/fullcalendar.min.js'></script>
    <script type='text/javascript' src='/food/Public/admin_style/assets/js/jquery.gritter.min.js'></script>
    <script type="text/javascript" src="/food/Public/admin_style/assets/js/realm.js"></script>
  
<script type="text/javascript">
var oSelect=document.getElementByIdx_x_x("tid");
oSelect.onchange=function(){                                       //当选项改变时触发
var valOption=this.options[this.selectedIndex].value;//获取option的value
alert(valOption);
var txtOption=this.options[this.selectedIndex].innerHTML;//获取option中间的文本
alert(txtOption);
}
</script>





</body>
</html>